package com.zrgg.futuwen.app;

import com.zrgg.futuwen.utils.Logger;

import rx.Observable;
import rx.Subscriber;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by Administrator on 2017/5/5.
 */
public class ObservableManager<T> {
    public Subscription onResponse(Observable<T> observable, Subscriber<T> subscriber) {
        Subscription subscribe = observable.observeOn(AndroidSchedulers.mainThread()).subscribeOn(Schedulers.newThread()).subscribe(subscriber);
        //退订取消subscribe.unsubscribe();
        return subscribe;
    }
}
